﻿using System;

class ConsoleMatrix
{
    static void Main()
    {
        //Exercise 12.
        //Write a program that reads from the console a positive integer number N (N < 20) and outputs a matrix like the following:
        // N = 3            N = 4

        startpoint:
        Console.Write("Enter a positive integer (N < 20):  ");
        uint number = uint.Parse(Console.ReadLine());

        if (number >= 20)
        {
            Console.WriteLine("Invalid number. Try again!");
            goto startpoint;
        }
        else
        {
            for (int rows = 1; rows <= number; rows++)
            {

                for (int colomns = rows; colomns <= number + rows - 1; colomns++)
                {
                    Console.Write(colomns + " ");
                }
                Console.WriteLine();
            }
        }        
        Console.WriteLine();
    }
}
